<?php
session_start ();
$_SESSION ['pathway'] = '..';
include ("../header.php");

if (! isset ( $_SESSION ['id'] ) or $_SESSION ['acces_genetique'] < 1) {
	echo "<table><tr><td>Session expired</td></tr>";
	echo "<tr><td><a href='" . $_SESSION ['pathway'] . "/index.php'>Start</a></td></tr></table>";
} else {
	
	require ("./requetes/remplissage_questionnaire_UHDRS.php");
	
	if ($hash_champ_UHDRS ['question_43'] == '0') {
		$check_question_43_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_43'] == '1') {
		$check_question_43_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_44'] == '0') {
		$check_question_44_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_44'] == '1') {
		$check_question_44_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_45'] == '0') {
		$check_question_45_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_45'] == '1') {
		$check_question_45_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_46'] == '0') {
		$check_question_46_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_46'] == '1') {
		$check_question_46_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_47'] == '0') {
		$check_question_47_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_47'] == '1') {
		$check_question_47_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_48'] == '0') {
		$check_question_48_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_48'] == '1') {
		$check_question_48_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_49'] == '0') {
		$check_question_49_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_49'] == '1') {
		$check_question_49_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_50'] == '0') {
		$check_question_50_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_50'] == '1') {
		$check_question_50_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_51'] == '0') {
		$check_question_51_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_51'] == '1') {
		$check_question_51_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_52'] == '0') {
		$check_question_52_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_52'] == '1') {
		$check_question_52_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_53'] == '0') {
		$check_question_53_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_53'] == '1') {
		$check_question_53_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_54'] == '0') {
		$check_question_54_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_54'] == '1') {
		$check_question_54_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_55'] == '0') {
		$check_question_55_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_55'] == '1') {
		$check_question_55_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_56'] == '0') {
		$check_question_56_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_56'] == '1') {
		$check_question_56_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_57'] == '0') {
		$check_question_57_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_57'] == '1') {
		$check_question_57_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_58'] == '0') {
		$check_question_58_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_58'] == '1') {
		$check_question_58_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_59'] == '0') {
		$check_question_59_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_59'] == '1') {
		$check_question_59_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_60'] == '0') {
		$check_question_60_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_60'] == '1') {
		$check_question_60_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_61'] == '0') {
		$check_question_61_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_61'] == '1') {
		$check_question_61_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_62'] == '0') {
		$check_question_62_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_62'] == '1') {
		$check_question_62_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_63'] == '0') {
		$check_question_63_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_63'] == '1') {
		$check_question_63_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_64'] == '0') {
		$check_question_64_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_64'] == '1') {
		$check_question_64_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_65'] == '0') {
		$check_question_65_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_65'] == '1') {
		$check_question_65_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_66'] == '0') {
		$check_question_66_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_66'] == '1') {
		$check_question_66_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['question_67'] == '0') {
		$check_question_67_0 = 'checked';
	} elseif ($hash_champ_UHDRS ['question_67'] == '1') {
		$check_question_67_1 = 'checked';
	}
	if ($hash_champ_UHDRS ['information_source'] == 'subject only') {
		$check_information_source_subject_only = 'checked';
	} elseif ($hash_champ_UHDRS ['information_source'] == 'subject and family/companion') {
		$check_information_source_subject_and_family_companion = 'checked';
	}
	
	$_SESSION ['hash_UHDRS'] = $hash_champ_UHDRS;
	
	?><a
	href="./page_principale.php?form=<?php echo $_SESSION['form'];?>#annexes">Back to form <?php echo $_SESSION['form'];?></a>

<form name='frm_UHDRS'
	action="page_principale.php?form=<?php echo $_SESSION['form']; ?>&amp;from=uhdrs#annexes"
	method='post'>
	<?php
	$disabled_tous = '';
	if ($_SESSION ['acces_clinique'] >= 2) {
		if ($_SESSION ['modification_groupe'] == '0') {
			$disabled_tous = 'disabled';
		} else {
			if ($_SESSION ['id'] != $hash_champ_valeur ['user']) {
				$querygroupe_user = "SELECT `ID_people_groupe`
				FROM `users`
				WHERE `last_name` LIKE '" . $_SESSION ['id'] . "';";
				// ~ echo $querygroupe_user."<br />";
				$resultgroupe_user = mysql_query ( $querygroupe_user ) or die ( "Impossible de r&#233;cup&#233;rer la liste des groupes" . mysql_error () );
				while ( $line = mysql_fetch_array ( $resultgroupe_user ) ) {
					$groupe_user = $line ['ID_people_groupe'];
				}
				if ($_SESSION ['ID_people_groupe'] == $groupe_user && $_SESSION ['modification_groupe'] < 2) { // cas ou modif user dans le meme groupe mais n'a pas les droits
					$disabled_tous = 'disabled';
				} elseif ($_SESSION ['ID_people_groupe'] != $groupe_user and $_SESSION ['modification_groupe'] < 3) { // cas ou pas dans le meme groupe, masi tous les droits
					$disabled_tous = 'disabled';
				}
			}
		}
	} else {
		$disabled_tous = 'disabled';
	}
	// ~ echo "<br />"."ID_people_groupe : ".$_SESSION['ID_people_groupe']." modification_groupe : ".$_SESSION['modification_groupe']." groupe_user : ". $groupe_user."<br />";
	
	?>
	
	

	<table class='principale'>

		<tr>
			<td colspan="2"><h2>
					ANNEX 5: Unified Huntington s Disease Rating Scale &#40;UHDRS&#41;
					<br />part IV: Functional Assessment
				</h2></td>
		</tr>

		<tr>
			<td></td>
			<td>No</td>
			<td>Yes</td>
		</tr>

		<tr>
			<td>43. Could subject engage in gainful employment in his/her
				accustomed work?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_43" value="0" <?php echo $check_question_43_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_43" value="1" <?php echo $check_question_43_1; ?> /></td>
		</tr>
		<tr>
			<td>44. Could subject engage in any kind of gainful employment?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_44" value="0" <?php echo $check_question_44_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_44" value="1" <?php echo $check_question_44_1; ?> /></td>
		</tr>
		<tr>
			<td>45. Could subject engage in any kind of volunteer or non gainful
				work?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_45" value="0" <?php echo $check_question_45_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_45" value="1" <?php echo $check_question_45_1; ?> /></td>
		</tr>
		<tr>
			<td>46. Could subject manage his/her finances (monthly) without any
				help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_46" value="0" <?php echo $check_question_46_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_46" value="1" <?php echo $check_question_46_1; ?> /></td>
		</tr>
		<tr>
			<td>47. Could subject shop for groceries without help ?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_47" value="0" <?php echo $check_question_47_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_47" value="1" <?php echo $check_question_47_1; ?> /></td>
		</tr>
		<tr>
			<td>48. Could subject handle money as a purchaser in a simple cash
				(store) transaction?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_48" value="0" <?php echo $check_question_48_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_48" value="1" <?php echo $check_question_48_1; ?> /></td>
		</tr>
		<tr>
			<td>49. Could subject supervise children without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_49" value="0" <?php echo $check_question_49_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_49" value="1" <?php echo $check_question_49_1; ?> /></td>
		</tr>
		<tr>
			<td>50. Could subject operate an automobile safely and independently?
			</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_50" value="0" <?php echo $check_question_50_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_50" value="1" <?php echo $check_question_50_1; ?> /></td>
		</tr>
		<tr>
			<td>51. Could subject do his/her own housework without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_51" value="0" <?php echo $check_question_51_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_51" value="1" <?php echo $check_question_51_1; ?> /></td>
		</tr>
		<tr>
			<td>52. Could subject do his/her own laundry (wash/dry) without help?
			</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_52" value="0" <?php echo $check_question_52_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_52" value="1" <?php echo $check_question_52_1; ?> /></td>
		</tr>
		<tr>
			<td>53. Could subject prepare his/her own meals without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_53" value="0" <?php echo $check_question_53_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_53" value="1" <?php echo $check_question_53_1; ?> /></td>
		</tr>
		<tr>
			<td>54. Could subject use the telephone without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_54" value="0" <?php echo $check_question_54_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_54" value="1" <?php echo $check_question_54_1; ?> /></td>
		</tr>
		<tr>
			<td>55. Could subject take his/her own medications without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_55" value="0" <?php echo $check_question_55_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_55" value="1" <?php echo $check_question_55_1; ?> /></td>
		</tr>
		<tr>
			<td>56. Could subject feed himself/herself without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_56" value="0" <?php echo $check_question_56_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_56" value="1" <?php echo $check_question_56_1; ?> /></td>
		</tr>
		<tr>
			<td>57. Could subject dress himself/herself without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_57" value="0" <?php echo $check_question_57_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_57" value="1" <?php echo $check_question_57_1; ?> /></td>
		</tr>
		<tr>
			<td>58. Could subject bathe himself/herself without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_58" value="0" <?php echo $check_question_58_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_58" value="1" <?php echo $check_question_58_1; ?> /></td>
		</tr>
		<tr>
			<td>59. Could subject use public transportation to get places without
				help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_59" value="0" <?php echo $check_question_59_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_59" value="1" <?php echo $check_question_59_1; ?> /></td>
		</tr>
		<tr>
			<td>60. Could subject walk to places in his/her neighbourhood without
				help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_60" value="0" <?php echo $check_question_60_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_60" value="1" <?php echo $check_question_60_1; ?> /></td>
		</tr>
		<tr>
			<td>61. Could subject walk without falling?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_61" value="0" <?php echo $check_question_61_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_61" value="1" <?php echo $check_question_61_1; ?> /></td>
		</tr>
		<tr>
			<td>62. Could subject walk without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_62" value="0" <?php echo $check_question_62_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_62" value="1" <?php echo $check_question_62_1; ?> /></td>
		</tr>
		<tr>
			<td>63. Could subject comb hair without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_63" value="0" <?php echo $check_question_63_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_63" value="1" <?php echo $check_question_63_1; ?> /></td>
		</tr>
		<tr>
			<td>64. Could subject transfer between chairs without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_64" value="0" <?php echo $check_question_64_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_64" value="1" <?php echo $check_question_64_1; ?> /></td>
		</tr>
		<tr>
			<td>65. Could subject get in and out of bed without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_65" value="0" <?php echo $check_question_65_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_65" value="1" <?php echo $check_question_65_1; ?> /></td>
		</tr>
		<tr>
			<td>66. Could subject use toilet/commode without help?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_66" value="0" <?php echo $check_question_66_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_66" value="1" <?php echo $check_question_66_1; ?> /></td>
		</tr>
		<tr>
			<td>67. Could subject's care still be provided at home?</td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_67" value="0" <?php echo $check_question_67_0; ?> /></td>
			<td><input <?php echo $disabled_tous;?> type="radio"
				name="question_67" value="1" <?php echo $check_question_67_1; ?> /></td>
		</tr>
	</table>

	<table class="principale">
		<tr>
			<td><b>Information Sources</b> <br />Was the Functional Assessment
				information obtained from:</td>
			<td><label><input <?php echo $disabled_tous;?> type="radio"
					name="information_source" value="subject only"
					<?php echo $check_information_source_subject_only; ?> />Subject
					only</label></td>
			<td><label><input <?php echo $disabled_tous;?> type="radio"
					name="information_source" value="subject and family/companion"
					<?php echo $check_information_source_subject_and_family_companion; ?> />Subject
					and family/companion</label></td>
		</tr>
		<tr>
			<td colspan="2"><br /> <br /> <br /> <br /> <input
				<?php echo $disabled_tous;?> type='submit' value='Submit' /></td>
			</td>
		</tr>

	</table>
</form>

<?php
}

include ("../footer.php");

?>
